package pojo;

/**
 * DepartmentattenddetailsId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class DepartmentattenddetailsId implements java.io.Serializable {

	// Fields

	private Attendstrategy attendstrategy;
	private Department department;

	// Constructors

	/** default constructor */
	public DepartmentattenddetailsId() {
	}

	/** full constructor */
	public DepartmentattenddetailsId(Attendstrategy attendstrategy,
			Department department) {
		this.attendstrategy = attendstrategy;
		this.department = department;
	}

	// Property accessors

	public Attendstrategy getAttendstrategy() {
		return this.attendstrategy;
	}

	public void setAttendstrategy(Attendstrategy attendstrategy) {
		this.attendstrategy = attendstrategy;
	}

	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof DepartmentattenddetailsId))
			return false;
		DepartmentattenddetailsId castOther = (DepartmentattenddetailsId) other;

		return ((this.getAttendstrategy() == castOther.getAttendstrategy()) || (this
				.getAttendstrategy() != null
				&& castOther.getAttendstrategy() != null && this
				.getAttendstrategy().equals(castOther.getAttendstrategy())))
				&& ((this.getDepartment() == castOther.getDepartment()) || (this
						.getDepartment() != null
						&& castOther.getDepartment() != null && this
						.getDepartment().equals(castOther.getDepartment())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getAttendstrategy() == null ? 0 : this.getAttendstrategy()
						.hashCode());
		result = 37
				* result
				+ (getDepartment() == null ? 0 : this.getDepartment()
						.hashCode());
		return result;
	}

}